﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;

namespace IDAL
{
    public interface IAdminDAL
    {
        ///////////////////////////////////////
        //private int _AD_adminId;

        //private string _AD_adminName;

        //private string _AD_adminPsd;

       // private System.Nullable<System.DateTime> _AD_lastLoginTime;

        //private string _AD_lastLoginIP;
        ////////////////////////////////



        /// <summary>
        /// 根据传入的ID判断一条数据是否存在
        /// </summary>       
        bool idExists(int adminId);


        /// <summary>
        /// 根据传入的username判断一条数据是否存在
        /// </summary>       
        bool nameExists(int userId);


        /// <summary>
        /// 增加一条数据
        /// </summary>                
        bool Add(string adminName, string adminPsd, System.DateTime lastLoginTime, string lastLoginIP);


        /// <summary>
        /// 增加一条数据
        /// </summary>                
        bool Add(Model.Admin admin);


        /// <summary>
        /// 更新一条数据
        /// </summary>             
        bool Update(int adminId, string adminName, string adminPsd, System.DateTime lastLoginTime, string lastLoginIP);


        /// <summary>
        /// 更新一条数据
        /// </summary>             
        bool Update(Model.Admin admin);


        /// <summary>
        /// 根据传入的accountID删除一条数据
        /// </summary>
        bool accountDelete(int adminId);


        /// <summary>
        /// 根据传入的adminName删除一条数据
        /// </summary>
        bool userDelete(string adminName);


        /// <summary>
        /// 根据传入的ID得到adminName
        /// </summary>       
        bool getAdminName(int adminId);


        /// <summary>
        /// 根据传入的adminName得到密码
        /// </summary>
        string getPsdByName(string adminName);


        /// <summary>
        /// 根据传入的id得到密码
        /// </summary>
        string  getPsdById(int adminId);


        /// <summary>
        /// 根据accountID得到一个对象实体
        /// </summary>
        Model.Admin GetModel(int adminId);
    }
}
